#ifndef ELEMENTS_STATE_H
#define ELEMENTS_STATE_H

#include "element.h"

namespace Elements
{

struct State : public Element
{
    State() = default;
    State(const State& other);

    // -- Интерфейс элемента -- //

    virtual bool isSame(Element* other) const override;

    virtual Common::Json toJson() const override;
    virtual void fromJson(const Common::Json& json) override;

    virtual Element* clone() const override;
    virtual ElementType elementType() const override;

    // -- Интерфейс данных -- //

    std::string caption() const;
    void setCaption(const std::string& value);

    std::string description() const;
    void setDescription(const std::string& value);

    unsigned workflowId() const;
    void setWorkflowId(const unsigned value);

    unsigned weight() const;
    void setWeight(const unsigned value);

    unsigned orderNumber() const;
    void setOrderNumber(const unsigned value);

    bool isArchive() const;
    void setIsArchive(const bool value);

    bool isQueue() const;
    void setIsQueue(const bool value);

private:
    std::string m_caption;
    std::string m_description;
    unsigned m_workflowId = 0;
    unsigned m_weight = 0;
    unsigned m_orderNumber = 0;
    bool m_isArchive = false;
    bool m_isQueue = false;
};

typedef std::shared_ptr<State> StatePtr;
typedef std::vector<StatePtr> States;

} // namespace Elements

#endif // ELEMENTS_STATE_H
